/*
 *  Copyright 2015-2016, RenGu Technology (BeiJing) Co., Ltd.
 *  All right reserved.
 *
 *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF RENGU TECHNOLOGY (BeiJing) CO., LTD.
 *
 *  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED TO THIR PARTIES,
 *  COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 *  WITHOUT THE PRIOR WRITTEN PERMISSION OF RENGU TECHNOLOGY (BeiJing) CO., LTD.
 *
 *  AcctCcyEnum
 *
 *  Edit History:
 *      lizhangtao Created on 2020年04月09日
 *
 */
package cc.rengu.igas.acct.common.enums;

/**
 * 账户币种枚举
 *
 * @author lizhangtao
 */
public enum AcctCcyEnum {
    //人民币
    RMB("156", "CNY"),
    ;
    private String srcCcy;
    private String dstCcy;

    AcctCcyEnum(String srcCcy, String dstCcy) {
        this.srcCcy = srcCcy;
        this.dstCcy = dstCcy;
    }

    public String getSrcCcy() {
        return srcCcy;
    }

    public void setSrcCcy(String srcCcy) {
        this.srcCcy = srcCcy;
    }

    public String getDstCcy() {
        return dstCcy;
    }

    public void setDstCcy(String dstCcy) {
        this.dstCcy = dstCcy;
    }

    public static String get(String srcCcy) {
        if (srcCcy == null) {
            return AcctCcyEnum.RMB.getSrcCcy();
        }
        for (AcctCcyEnum type : AcctCcyEnum.values()) {
            if (type.getSrcCcy().equals(srcCcy)) {
                return type.getSrcCcy();
            }
        }
        return AcctCcyEnum.RMB.getSrcCcy();
    }
}
